<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../utils.js"></script>
</head>
<body>
  <div style="position: absolute; top: 30px;">
    <p style="margin-top: 40px;">段落</p>
  </div>
  <script>
    var p = document.querySelector('p')
    console.log(p.offsetParent.offsetParent.offsetParent)

    console.log(utils.getBodyOffset(p))
  </script>
</body>
</html>